//
// Created by wkm on 2023-12-11.
//

#ifndef MYSYSTEMCLEARNING_DUMP_RESULTS_H
#define MYSYSTEMCLEARNING_DUMP_RESULTS_H

#include <iostream>
#include <fstream>
#include "systemc.h"
#include "../../ModelingExample/ShiftRegister/usr_define.h"

SC_MODULE(dump_results) {
    sc_in<bool> clock, clear, left_in, right_in;
    sc_in<sc_uint<SEL_WIDTH>> sel_op;
    sc_in<sc_uint<WIDTH>> data_in, data_out;

    // 声明输出流
    ofstream outfile;

    void behavior_dump();

    SC_CTOR(dump_results) {
        SC_METHOD(behavior_dump);
        sensitive_neg << clock;
        // 打开输出文件 “mydump.out”
        outfile.open("mydump.out");
    }
};

#endif //MYSYSTEMCLEARNING_DUMP_RESULTS_H
